<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
   xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
   xmlns:f="http://xmlns.jcp.org/jsf/core"
   xmlns:h="http://xmlns.jcp.org/jsf/html"
   xmlns:p="http://primefaces.org/ui"   
   xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
   template="/WEB-INF/templates/default.xhtml">
   
   	<f:metadata>	   	
	   	<f:viewParam name="firstResult" value="#{assessRecordList.firstResult}"></f:viewParam>	
	   	<f:viewParam name="serviceSupplierName" value="#{assessRecordList.serviceSupplierName}"></f:viewParam>	
	   	<f:viewParam name="dictId" value="#{assessRecordList.dictId}"></f:viewParam>	
	   	<f:event listener="#{dictList.setMaxResults(999999)}" type="preRenderView"></f:event>
	   	<f:viewParam name="moduleName" value="信用记录管理"></f:viewParam>
   	</f:metadata>
   
   	<ui:define name="content">
   
		<h:form id="searchForm">
			<div style="height:50px;margin-left:10px">				
				<p:outputLabel value="中介机构："></p:outputLabel>				
				<p:inputText value="#{assessRecordList.serviceSupplierName}"></p:inputText>
				#{' '}
				<p:outputLabel  value="所属评价事项：" />				
				<p:selectOneMenu  value="#{assessRecordList.dictId}" style="width: 300px; !important">
					<f:selectItem itemLabel="-请选择-" itemValue="#{null}"/>
					<f:selectItems value="#{dictList.resultList}" var="_dic" itemLabel="#{_dic.title}" itemValue="#{_dic.id}"></f:selectItems>
				</p:selectOneMenu>
				#{' '}
				<div class="actionButtons">
					<p:commandButton value="查询" ajax="false"  action="AssessRecordList.xhtml?faces-redirect=true&amp;includeViewParams=true&amp;firstResult=0" styleClass="blue-int"></p:commandButton>
					<p:button value="重置" outcome="AssessRecordList.xhtml"></p:button>
				</div>				
				<div class="clearbt"></div>
			</div>
			
			<p:panel id="searchResult">
				<p:dataTable value="#{assessRecordList.resultList}" var="_record">
					<p:column>
						<f:facet name="header">中介机构</f:facet>
						<h:outputText value="#{_record.serviceSupplier.cnname}" />						
					</p:column>
					
					<p:column >
						<f:facet name="header">所属评价事项</f:facet>
						<h:outputText value="#{_record.dict.title}" />						
					</p:column>				
					<p:column width="50">
						<f:facet name="header">分值</f:facet>
						<h:outputText value="#{_record.score}" />						
					</p:column>
					
					<p:column width="180">
						<f:facet name="header">评价日期</f:facet>
						<h:outputText value="#{_record.assessDate}" >
							<f:convertDateTime pattern="yyyy/MM/dd HH:mm:ss"/>
						</h:outputText>					
					</p:column>
					<p:column width="80">
						<f:facet name="header">当前状态</f:facet>
						<h:outputText value="#{_record.recordStatus.typeName}" />				
					</p:column>
					<p:column style="text-align: center;width:200px;">
						<f:facet name="header">操作</f:facet>
						<ui:remove>
							<p:button outcome="AssessRecordEdit.xhtml" value="编辑">							
								<f:param name="recordId" value="#{_record.id}"></f:param>
							</p:button>
							
							<p:button outcome="AssessRecordAudit.xhtml" value="审核" target="_blank">							
								<f:param name="recordId" value="#{_record.id}"></f:param>
							</p:button>
						</ui:remove>
						<p:button outcome="AssessRecordView.xhtml" value="查看">
							<f:param name="recordId" value="#{_record.id}"></f:param>
						</p:button>
					</p:column>
				</p:dataTable>
			</p:panel>
			
			<ui:include src="/WEB-INF/templates/manage/pagination.xhtml">
				<ui:param name="entityList" value="#{assessRecordList}" />
			</ui:include>
			
		</h:form>
		
		<p:button href="AssessRecordEdit.xhtml" value="新增信用记录"></p:button>
      
   	</ui:define>
</ui:composition>
